home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
filelist
/
pulldown.bas
< prev
Wrap
BASIC Source File
|
1995-09-07
|
6KB
|
215 lines
Dim szCode As String
Dim szDescr As String
Dim KeyRet As Integer
Sub FileLists_KeyDown (fForm As Form, KeyCode As Integer, Shift As Integer)
If KeyCode = KEY_RETURN Then
If fForm.FileList.ListSelect(0) <> -1 Then
a$ = fForm.FileList.ListArray(fForm.FileList.ListSelect(0))
SetReturn a$
Else
SetReturn ""
End If
fForm.Hide
ElseIf KeyCode = KEY_DELETE Then
fForm.Hide
End If
KeyRet = KeyCode
End Sub
Sub LoadColori (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 31
fForm.FileList.FileName = "colori.txt"
End Sub
Sub LoadDisegni (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 31
fForm.FileList.FileName = "disegni.txt"
End Sub
Sub LoadEpoca (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 31
fForm.FileList.FileName = "epoche.txt"
End Sub
Sub LoadFibre (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 31
fForm.FileList.FileName = "fibre.txt"
End Sub
Sub LoadFoggia (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 26
fForm.FileList.FileName = "fogge.txt"
End Sub
Sub LoadTessuti (fForm As Form)
fForm.Width = 2000
fForm.Height = 3000
fForm.FileList.Move 0, 0, fForm.ScaleWidth, fForm.ScaleHeight
fForm.FileList.MaxSelect = 1
fForm.FileList.ListGray(0) = -1
Rem FILTERS
fForm.FileList.DisplayCol(0) = 2
fForm.FileList.DisplayCol(1) = 3
fForm.FileList.DisplayCol(2) = 4
fForm.FileList.DisplayCol(3) = -1
fForm.FileList.OutputCol(0) = 1
fForm.FileList.OutputCol(1) = 2
fForm.FileList.OutputCol(2) = 3
fForm.FileList.OutputCol(3) = 4
fForm.FileList.OutputCol(4) = -1
fForm.FileList.InputCol(0) = 1
fForm.FileList.InputCol(1) = -1
fForm.FileList.LineSize = 31
fForm.FileList.FileName = "tessuti.txt"
End Sub
Function ReturnKey () As Integer
ReturnKey = KeyRet
End Function
Sub SetReturn (szRet As String)
nBlankPos = InStr(szRet, " ")
If nBlankPos > 0 Then
szCode = Mid$(szRet, 1, nBlankPos - 1)
szDescr = Mid$(szRet, nBlankPos + 1)
Else
szCode = ""
szDescr = ""
End If
End Sub
Function szReturnCode () As String
szReturnCode = szCode
End Function
Function szReturnDescr () As String
szReturnDescr = szDescr
End Function